<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		p{
			display: inline-block;
		}
	</style>
	<script>
		window.onload= function (argument) {
			
			function run() {
				var now = new Date();
				var wuyi = new Date("2019-05-01 0:0:0");

				var diff = (wuyi.getTime()-now.getTime())/1000;

				var day = Math.floor(diff/86400);

				diff = diff%86400;

				var hour = Math.floor(diff/3600);

				diff = diff%3600;

				var minute = Math.floor(diff/60);

				var second = Math.floor(diff%60);

				// console.log(hour);
				// console.log(day);
				// console.log(minute);
				// console.log(second);
				// box1 = document.getElementById('box1');

				box = document.getElementsByClassName('box');
				// console.log(box);

				box[0].innerHTML = day;
				box[1].innerHTML = hour;
				box[2].innerHTML = minute;
				box[3].innerHTML = second;

				// box1.innerHTML = second;
			}

			setInterval(run,1000);
		}
	</script>
</head>
<body>
	<p class="box">46</p>:
	<p class="box">12</p>:
	<p class="box">45</p>:
	<p class="box">67</p>
	
</body>
</html>